/*
 *  ScannerFSMExceptions.h
 *  Parser
 *
 *  Created by Christoph Ehscheidt on 10.02.08.
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
 *
 */

#ifndef _SCANNER_FSM_EXCETPIONS_
#define _SCANNER_FSM_EXCETPIONS_

/**
* EXCEPTION DEFINITION
**************************/
/**
* Exception class.
*/
class ScannerFSMException {
	/// Message
	char* msg;
public:	
	/**
	* Initializes exception.
	* 
	* \param msg Message
	*/
	ScannerFSMException(char* msg);
	virtual char* getMessage();

};


/**
* EXCEPTION DEFINITION
**************************/
/**
* Syntax Exception class.
*/
class ScannerFSMSyntaxException : public ScannerFSMException {
	/// Line of the syntax error
	unsigned int line;
	/// Column of the syntax error
	unsigned int column;
	/// Lexem which caused the errors
	char* lexem;
public:
	ScannerFSMSyntaxException(char* msg, char *lexem, unsigned int line, unsigned int column);
	
	char* getLexem();
	unsigned int getLine();
	unsigned int getColumn();
	
};


/**
* EXCEPTION DEFINITION
**************************/
/**
* Range Exception class.
*/
class ScannerFSMRangeException : public ScannerFSMSyntaxException {
	public: ScannerFSMRangeException(char* msg, char* lexem, unsigned int line, unsigned int column);
};

#endif //_SCANNER_FSM_EXCETPIONS_
